//
//  CommonData.h
//  Ev_Master
//
//  Created by Evan on 2019/6/10.
//  Copyright © 2019 Evan. All rights reserved.
//

#ifndef CommonData_h
#define CommonData_h


#define hasLaunchedOnce                     @"hasLaunchedOnce"                      //曾经启动过就是false

//屏幕尺寸
#define KScreenWidth                        [UIScreen mainScreen].bounds.size.width             // 屏幕宽度
#define KScreenHeight                       [UIScreen mainScreen].bounds.size.height            // 屏幕高度
#define distanceHeight                      160

// 判断是否是ipad
#define isPad ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)
// 判断iPhone6系列
#define kiPhone6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
//判断iphone6+系列
#define kiPhone6Plus ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
// 判断iPhoneX
#define IS_IPHONE_X ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
// 判断iPHoneXr
#define IS_IPHONE_Xr ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(828, 1792), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
// 判断iPhoneXs
#define IS_IPHONE_Xs ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)
// 判断iPhoneXs Max
#define IS_IPHONE_Xs_Max ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2688), [[UIScreen mainScreen] currentMode].size) && !isPad : NO)

#define KSHeight_StatusBar ((IS_IPHONE_X == YES || IS_IPHONE_Xr == YES || IS_IPHONE_Xs == YES || IS_IPHONE_Xs_Max == YES) ? 44.0 : 20.0)
#define KSHeight_NavBar ((IS_IPHONE_X == YES || IS_IPHONE_Xr == YES || IS_IPHONE_Xs == YES || IS_IPHONE_Xs_Max == YES) ? 88.0 : 64.0)
#define KSHeight_TabBar ((IS_IPHONE_X == YES || IS_IPHONE_Xr == YES || IS_IPHONE_Xs == YES || IS_IPHONE_Xs_Max == YES) ? 83.0 : 49.0)



#define UIColorFromRGB(rgbValue) \
[UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16)) / 255.0 \
green:((float)((rgbValue & 0xFF00) >> 8)) / 255.0 \
blue:((float)(rgbValue & 0xFF)) / 255.0 \
alpha:1.0]
#define UIColorFromRGBA(rgbValue, a) \
[UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16)) / 255.0 \
green:((float)((rgbValue & 0xFF00) >> 8)) / 255.0 \
blue:((float)(rgbValue & 0xFF)) / 255.0 \
alpha:a]
//设置颜色ga
#define LCFromRGB(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]

#define COLOR_Background                    LCFromRGB(248,248,248)                  //背景颜色--灰色
#define COLOR_Background_black              LCFromRGB(25, 30, 46)  //首页和交易页背景色
#define COLOR_main                          LCFromRGB(64, 186, 238) //主体玫红色
#define COLOR_home_topNotice                LCFromRGB(7, 35, 75)

//交易模块颜色值


#define COLOR_Line                          LCFromRGB(230,230,230)                  //线条颜色
#define COLOR_BianKuang                     LCFromRGB(227,227,227)                  //边框颜色

//tabbar 颜色值
#define COLOR_tabBarRed                     LCFromRGB(64, 186, 238)                  //tabbar高亮红色

#define COLOR_NAVIGATION                    LCFromRGB(30,30,30)                     //主题导航navigation背景色

//NSError 的错误字段名
#define NSErrorMessagePro                   @"NSLocalizedDescription"
///登录用户信息本地存储key
#define SAVE_KEY_PROFILE    @"SAVE_KEY_PROFILE"
///登录用户token本地存储
#define SAVE_KEY_AUTH       @"SAVE_KEY_AUTH"

///webviewHost 域名
//#define WebViewH5Host       @"http://localhost:8081"
#define WebViewH5Host       @"http://hellogod.club/"

///登录成功
#define Notification_login_ok_notice          @"NotificationLoginOkNotice"

#endif /* CommonData_h */
